/**
 * Author: Dmitry Ustimov
 * Date: 5/15/13
 * Time: 10:16 AM
 */

package com.gmail.dmitryustimov.ms.java7.mediator.mod.example;

public abstract class Colleague {

    String name;
    Mediator<Colleague> mediator;
    Action<Event> action;

    EventPublisher<Event> eventPublisher = new EventPublisher<>();

    public Colleague(String name, Mediator<Colleague> mediator) {
        this.name = name;
        this.mediator = mediator;
    }

    public void change() {
        Event event = makeChange();
        eventPublisher.publish(event);
    }

    public abstract Event makeChange();
}
